package cn.cimoc.pojo.guanyu;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * @author LGZ
 * @date 2022/7/3 16:17
 * <p>
 */
@Component
@Data
public class GuanYu {
    private String name = "关羽";

    @Autowired
    @Qualifier("redRabbit")
    private Mount mount;

    @Autowired
    private Weapon weapon;

    public void out() {
        System.out.println(name + "骑着" + mount.getName() + "拿着" + weapon.getName() + "在战斗");
    }
}
